package com.copyctrl.feignapi.util;

import com.copyctrl.feignapi.pojo.User;

/**
 * @author:JH
 * @version:1.0
 */
public class UserHolder {
    private static final ThreadLocal<User> tl = new ThreadLocal<>();

    public static void saveUser(User user){
        tl.set(user);
    }

    public static User getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
